package com.paas.demo.thrift.impl;

import org.apache.thrift.TException;
import org.springframework.stereotype.Service;

import com.paas.demo.thrift.api.*;
/**
 * @ClassName : OAuthProviderServiceImpl 
 * @Description : TODO
 * @author : pengjie
 * @email  : 627799251@qq.com
 * @version  
 * @Date ： 2018年12月26日 上午11:04:23
*/
@Service("oauthProviderServiceImpl")
public class OAuthProviderServiceImpl implements OAuthProviderService.Iface{

	@Override
	public OAuthApp registerApp(OAuthApp app) throws TException {
		// TODO Auto-generated method stub
		OAuthApp aOAuthApp = new OAuthApp();
		aOAuthApp.setCreatedAt(System.currentTimeMillis());
		aOAuthApp.setDescription("This is a Description");
		aOAuthApp.setName("This a test oauth app");
		aOAuthApp.setId("plat-demo");
		aOAuthApp.setLevel(1);
		aOAuthApp.setSite("plat");
		aOAuthApp.setStatus((short) 1);
		return aOAuthApp;
	}

	@Override
	public OAuthApp getAppById(String id) throws TException {
		// TODO Auto-generated method stub
		OAuthApp aOAuthApp = new OAuthApp();
		aOAuthApp.setCreatedAt(System.currentTimeMillis());
		aOAuthApp.setDescription("This is a Description");
		aOAuthApp.setName("This a test oauth app");
		aOAuthApp.setId("plat-demo");
		aOAuthApp.setLevel(1);
		aOAuthApp.setSite("plat");
		aOAuthApp.setStatus((short) 1);
		return aOAuthApp;
	}
	
}
